﻿<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta name="apple-itunes-app" content="app-id=591578609">
	<meta name="viewport" content="width=device-width"/>
	<meta name="description" content="筑学堂网校" />
	<script type="text/javascript">
	
	   //我要报名
	   function baoming(id){
		   $.ajax({ url: "add_members_activity/"+id, 
		       success: function(result){
	              alert(result);
	           }
	       });
	   }
	   
	   function activityDetail(group_id,activity_id){
		   window.open('query_group_main/'+group_id+"?flag=activity&activityId="+activity_id,'_blank');
		   
	   }
   </script>
</head>

<body style="clear:both;align:center;">
	<!--群组活动-->
	<div id="tab1" class="home_hy_div02" style="display:block;">
		<div class="ms_tab1_text01">&nbsp;</div>
		
		<!-- 第一列 -->
		<div class="home_qz_divl" style="left:30px;">
		
		  <c:forEach items="${data.data}" var="li" varStatus="item">
		    <c:if test="${item.index % 2== 0}">
				        <div class="home_qz_div01"> 
						
						<div class="home_hy_div0101"> <a href="#" onclick="activityDetail('${li.group_id}','${li.id}')"><img src="../images/home_images/qz00.jpg"/>	</a> </div>
					
						<div class="home_qz_div0102">
							<table width="390px" height="80px" align="left">
									<tr >
										<td style="font-size:14px;font-weight:bold;height:30px;width:290px;"> 
											<a href="#" onclick="activityDetail('${li.group_id}','${li.id}')">${li.activity_nm}</a>
										</td>
										<td style="width:30px;"> </td>
										<td style="width:70px;"> 
										     <c:if test="${user_id!=li.member_id && li.in_flag == 0}">
											      <a href="#" style="color:#e2681f" onclick="baoming('${li.id}')"> 我要报名 </a> 
											 </c:if>
										</td>
									</tr>
									<%-- <tr heigh="20px" colspan="3">
										<td colspan="3"> ${li.activity_txt} </td>
									</tr> --%>
									<tr heigh="20px">
										<td> 时间：${li.start_dt}至${li.end_dt} </td>
										<td style="width:70px;" colspan="2"> 发起人：${li.sponsor_nm} </td>
									</tr>
									<tr heigh="20px" colspan="3">
										<td> 参与人数：${li.count} </td>
									</tr>
							</table>
						</div>
					</div>
					<div class="home_qz_div00"> </div>
		    </c:if>
			
			
		  </c:forEach>
		</div>
		
		<!-- 第二列 -->
		<div class="home_qz_divl" style="left:80px;">
		   <c:forEach items="${data.data}" var="li" varStatus="item">
		       
		        <c:if test="${item.index % 2 != 0}">
				            <div class="home_qz_div01"> 
								
								<div class="home_hy_div0101"> <a href="#" onclick="activityDetail('${li.group_id}','${li.id}')"><img src="../images/home_images/qz00.jpg"/>	</a> </div>
							
								<div class="home_qz_div0102">
									<table width="390px" height="80px" align="left">
											<tr >
												<td style="font-size:14px;font-weight:bold;height:30px;width:290px;"> 
													 <a href="#" onclick="activityDetail('${li.group_id}','${li.id}')">${li.activity_nm}</a>
												</td>
												<td style="width:30px;"> </td>
												<td style="width:70px;"> 
												     <c:if test="${user_id!=li.member_id&& li.in_flag == 0}">
													      <a href="#" style="color:#e2681f" onclick="baoming('${li.id}')"> 我要报名 </a> 
													 </c:if>
												</td>
											</tr>
											<%-- <tr heigh="20px" colspan="3">
												<td colspan="3"> ${li.activity_txt} </td>
											</tr> --%>
											<tr heigh="20px">
												<td> 时间：${li.start_dt}至${li.end_dt} </td>
												<td style="width:70px;" colspan="2"> 发起人：${li.sponsor_nm} </td>
											</tr>
											<tr heigh="20px" colspan="3">
												<td> 参与人数：${li.count} </td>
											</tr>
									</table>
								</div>
							</div>
							<div class="home_qz_div00"> </div>
		        
		        </c:if>
		    </c:forEach>
		 </div>       
		
		<!--页面切换-->
		<div class="page_div">
			<div class="page_body"> <a href="#">
				<div class="kczx_divlb01"  onclick="firstPage()">首&nbsp;页</div>
				</a>
				<div class="kczx_divlb02"></div>
				<a href="#">
				<div class="kczx_divlb01" onclick="upPage()">上一页</div>
				</a>
				<div class="kczx_divlb02"></div>
				<a href="#">
				<div class="kczx_divlb01" onclick="nextPage()">下一页</div>
				</a>
				<div class="kczx_divlb02"></div>
				<select class="kczx_divlb01 page_select" onchange="gotoPage()" id="hostSelect">
				    <c:forEach begin="1" end="${sumPageNum}" var="i">  
					     <option value="${i}" <c:if test="${pageNo == i}"> selected="selected" </c:if>  >
					        第${i}页
					     </option>
				     </c:forEach> 
				</select>
			</div>
		</div>
		<!--end页面切换--> 
		
	</div>
	
</body>
</html>